package com.yx.fsysserver.file.vo;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * Created by lichagnfeng on 2017/3/6.
 */

public class UploadResult implements Serializable {

    private static final long serialVersionUID = 1L;

    private boolean status;
    private String message;
    private String title;
    private String original;
    private String fileName;
    private long size;
    private String url;
    private String uuid;
    private String urlView;
    private String state = "SUCCESS";

    public UploadResult(boolean status, String message, String title, String original,long size, String url,String urlView,String suffix) {
        this.status = status;
        this.message = message;
        this.title = title;
        this.original = original;
        if (StringUtils.isEmpty(suffix)){
            this.fileName = original;
        }else {
            this.fileName = original+"."+suffix;
        }

        this.size = size;
        this.uuid =  url;
        this.url =  url;
        this.urlView = urlView;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getOriginal() {
        return original;
    }

    public void setOriginal(String original) {
        this.original = original;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getState() {
        return state;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getUrlView() {
        return urlView;
    }

    public void setUrlView(String urlView) {
        this.urlView = urlView;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
}
